//酷9JS交流群424765458


function main(BRTV) {
    let url = BRTV["url"];
    let id = ku9.getQuery( url,  "id" );
    const n = {
        'bjws': "beijing",
        'bjwy': "btv2",
        'bjys': "btv4",
        'bjcj': "btv5",
        'bjsh': "btv7",
        'bjxw': "btv9",
        'jskj': "btv11",
        'kkse': "kkse"
    };
    const jsonUrl = 'http://p.ytelc.com/169l/bj/btv.php?id=' + n[id];
    const headers = {};
    let playData =  ku9.get(jsonUrl, JSON.stringify(headers));
    let regex = /"url": "(https:\/\/.+?)"/;
    let match = playData["match"](regex);
    let finalUrl = match[1];
    return JSON["stringify"]({
        url: finalUrl
    })
}